package L1;

import java.io.IOException;
import java.util.Scanner;

public class _086 {
    /**
     * 斯德哥尔摩火车上的题
     */
    public static void main(String[] args) throws IOException {
        Scanner scanner = new Scanner(System.in);
        String s1 = scanner.nextLine();
        String s2 = scanner.nextLine();
        String s="";
        s1=getString(s1);
        s2=getString(s2);
        if (s1.equals(s2)){
            System.out.println(s1);
        }else {
            System.out.println(s1);
            System.out.println(s2);
        }
        scanner.close();
    }
    private static String getString(String temp){
        String s="";
        for (int i = 1; i < temp.length(); i++) {
            if ((temp.charAt(i)-'0') % 2 == (temp.charAt(i-1)-'0') % 2) {
                s += Math.max((temp.charAt(i)-'0'),(temp.charAt(i-1)-'0'));
            }
        }
        return s;
    }
}
